package com.situ.stl.mapper;


import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ChartsMapper {
    @MapKey("date")
    List<Map<String, Object>> selectCourseCount(Date date);
    @MapKey("date")
    List<Map<String, Object>> selectReserveCount(Date date);
    @MapKey("date")
    List<Map<String, Object>> selectCoachCount(Date date);
    @MapKey("date")
    List<Map<String, Object>> selectMemberCount(Date date);
    @MapKey("date")
    List<Map<String, Object>> selectCourseOrderByReserve(Date date);
    @MapKey("date")
    List<Map<String, Object>> selectCoachOrderByReserve(Date date);

    @Select("select count(0) as count from member")
    Map<String, Object> selectMemberTotal();
    @Select("select count(0) as count from coach")
    Map<String, Object> selectCoachTotal();
    @Select("select count(0) as count from course")
    Map<String, Object> selectCourseTotal();
    @Select("select count(0) as count from reserve")
    Map<String, Object> selectReserveTotal();
}
